package com.dingding.service.user.core.feedback.dao.impl;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;

import com.dingding.common.core.base.daox.ICriteriaBaseDao;
import com.dingding.common.core.beans.Feedback;
import com.dingding.service.user.core.feedback.dao.IFeedbackDao;

/**
 * 
 * @ClassName: FeedbackDaoImpl 
 * @Description:  意见反馈DAO实现类
 * @author YHQ
 * @date 2016年11月22日 下午3:11:23
 * @since V2.5.6
 * 
 */
@Component("feedbackDao")
public class FeedbackDaoImpl implements IFeedbackDao{

	private Logger log = Logger.getLogger(this.getClass());
	
	@Resource(name = "criteriaBaseDao")
	private ICriteriaBaseDao criteriaBaseDao;
	
	/**
	 * 
	 * @Title: userFeedback 
	 * @Description: 用户意见反馈 
	 * @param feedback 意见反馈对象(要保存的反馈信息)
	 * @author YHQ 
	 * @since V2.5.6
	 * @return boolean    返回类型
	 * 
	 */
	@Override
	public boolean userFeedback(Feedback feedback) {
		
		try {
			criteriaBaseDao.save(feedback);
			return true;
		} catch (Exception e) {
			log.error("保存用户意见反馈信息时出现异常  类：" + this.getClass() + " userFeedback()", e);
		}
		
		return false;
	}

}
